articleDetail ={editComment:function(d,f,i,c){
		$.ajax({url:'ajaxGetComment.action',
				data:{"commentId":f},
				dataType:'json',
				async:false,
				success:function(json){
					$("#comment").val(json.content);
					$("#editCommentId").val(f);
				}
			});
		return addComment.moveForm(d,f,i,c);
	},
	postComment:function(d,f,i,c){
		$("#editCommentId").val('');
		return addComment.moveForm(d,f,i,c);
	}
};
$(function(){
		$("#cancel-comment-reply-link").click(function(){
			$(".formError").remove();
			$("body").focus();
		});
		$("#commentform").validationEngine({
			promptPosition: "topRight", // OPENNING BOX POSITION, IMPLEMENTED: topLeft, topRight, bottomLeft,  centerRight, bottomRight
			success :  false,
			failure : function(){}
		});
		$("#submit").click(function(){
			if(!$.validationEngine.submitValidation("#commentform")){
				var quickLogin = $("#quickLogin").val();
				var data;
				if("true" == quickLogin){
					data = {"quickLogin":quickLogin,"UserName":$("#userName").val(),"password":$("#password").val(),"comment_parent":$("#comment_parent").val(),"comment_post_ID":$("#comment_post_ID").val(),"commentContent":$("#comment").val().replace(/>/g,"&gt;").replace(/</g,"&lt;"),"editCommentId":$("#editCommentId").val()};
				}else{
					data = {"quickLogin":quickLogin,"comment_parent":$("#comment_parent").val(),"comment_post_ID":$("#comment_post_ID").val(),"commentContent":$("#comment").val().replace(/>/g,"&gt;").replace(/</g,"&lt;"),"editCommentId":$("#editCommentId").val()};
				}
				var url = 'postComment.action';
				$.post(url,
					   data,
					   function(feedData){
							if(feedData == true ){
								location.reload(true);
							}else{
								$.validationEngine.buildPrompt("#userName","* 用户名或密码错误","error");				
							}
						},
						'json'
				);
			}
		});
	
});